package com.iting.test.controller;

import org.springframework.stereotype.Component;
import org.springframework.web.HttpRequestHandler;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * @author iting Nie
 * @version 1.1
 * @create 2022/2/11
 */
@Component("/httprequesthandlercontroller")
public class HttpRequestHandlerController implements HttpRequestHandler {
	public HttpRequestHandlerController() {
		System.out.println("HttpRequestHandlerController");
	}

	@Override
	public void handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		PrintWriter writer = response.getWriter();
		writer.print("HttpRequestHandler");
	}
}
